<%- read_only ||= false -%>

<li class="task" id="task-<%= task.id %>" data-status="<%= task.status %>">
  <%= render 'shipit/commits/commit_author', commit: task %>
  <a href="<%= stack_task_path(@stack, task) %>" class="status status--<%= task.status %>" data-tooltip="<%= task.status.capitalize %>">
    <i class="status__icon"></i>
    <span class="visually-hidden"><%= task.status %></span>
  </a>

  <div class="commit-details">
    <span class="commit-title">
      <a href="<%= stack_task_path(@stack, task) %>">
        <%= task.definition.action %>
      </a>
    </span>
    <p class="commit-meta">
      ran a command
    </p>
    <p class="commit-meta">
      <% if read_only %>
        <span class="utc-timecode">on <%= task.created_at.strftime('%Y-%m-%d %H:%M:%S') %> UTC</span>
      <% else %>
        <%= timeago_tag(task.created_at, force: true) %>
      <% end %>
    </p>
  </div>
</li>
